--建表
create table  USERS(
id       number   constraints PK_USER primary key,
Name  NVARCHAR2 (50) CONSTRAINTS UQ_USER_NAME NOT NULL,
AGE NUMBER CHECK(AGE>0),
BIRTHDATE DATE);

--建索引
create sequence  SEQ_USERS;
--插入数据
insert into users(id,name,age,birthdate) values( SEQ_USERS.NEXTVAL,'jack_ma',55,sysdate);

select * from users;
--更新
update users  set age=1 where id=2;
--删除
delete from users where id=1;

commit;


--创建用户、给用户授予权限
-- Create the user 
create user JDBCUSER
  default tablespace USERS
  temporary tablespace TEMP
  profile DEFAULT
  password expire;
-- Grant/Revoke role privileges 
grant connect to JDBCUSER;
grant resource to JDBCUSER;
-- Grant/Revoke system privileges 
grant unlimited tablespace to JDBCUSER;

